<?php
/** .-------------------------------------------------------------------
* |  Software: [HDCMS framework]
* |      Site: www.hdcms.com
* |-------------------------------------------------------------------
* |    Author: 向军 <2300071698@qq.com>
* |    WeChat: aihoudun
* | Copyright (c) 2012-2019, www.houdunwang.com. All Rights Reserved.
* '-------------------------------------------------------------------*/

namespace app\home\controller;

class PayMent{
    //动作
    public function index(){
    //此处书写代码...
        $oid=Q('get.oid');
        $Data=Db::table('orders')
            ->join('order_list','orders.oid','=','order_list.oid')
            ->where('orders.oid',$oid)
            ->join('goods','order_list.gid','=','goods.gid')
            ->first();
        View::with('Data',$Data);
        return view();
    }

    public function huo(){
        $oid = Q('get.oid');
        $order=new \system\model\Order();
        $order->where('oid',$oid)->update(['status'=>'已完成']);
//        p($order);die;
        message('支付成功',u('personal.index'),'success');
    }
}
